<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">
        <jsp:include page="find.jsp" flush="true"></jsp:include>
        <div class="layui-form-item">
            <table class="layui-table" id="newstable">
                <thead>
                <tr>
                    <th scope="col">ID</th>
                    <th scope="col">标题</th>
                    <th scope="col">作者</th>
                    <th scope="col">时间</th>
                    <th scope="col">添加者</th>
                    <th scope="col">图片</th>
                    <th scope="col">主要内容</th>
                    <th scope="col">类别</th>
                    <th scope="col">操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="f" items="${found}" varStatus="s">
                        <tr>
                            <th scope="row">${s.index+1}</th>
                            <td>${f.title}</td>
                            <td>${f.author}</td>
                            <td>${f.datetime}</td>
                            <td>${f.adder}</td>
                            <td>${f.picadr}</td>
                            <td>${f.main}</td>
                            <td>${f.category}</td>
                            <td><a class="layui-btn layui-btn-xs" lay-event="edit"
                                   href="/ShowNewsInfo?id=${f.id}">编辑</a>
                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"
                                   href="/DelNews?id=${f.id}">删除</a>
                        </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
</div>
